#include "data_type.h"
#include <cuda.h>
#include <cuda_runtime.h>
using namespace cv::cuda;
namespace Registration {

__global__ void kernel_compute_vertex_map(uint16_t *depth_image,
                                          float3 *point_cloud, int image_width,

                                          int image_height,
                                          const float depth_cutoff,
                                          const CameraParams camera_params);
__global__ void kernel_generate_depth_map(const float3 *input_point_cloud,
                                          int point_num, float *depth_data,
                                          int image_width, int image_heght,
                                          const CameraParams &camera_params);

__global__ void kernel_compute_normal_map(float3 *point_vertex,
                                          float3 *point_normal, int image_width,
                                          int image_height);

__device__ float3 cross(float3 &vec_1, float3 &vec_2);

__device__ int Round(float target_data);

void compute_vertex_map(uint16_t *depth_map, float3 *vertex_map,
                        int image_width, int image_height,
                        const float depth_cutoff,
                        const CameraParams camera_params);

void compute_normal_map(float3 *vertex_map, float3 *normal_map, int image_width,
                        int image_height);

__device__ void norm(float3 &input);

} // namespace Registration